import sessionUtils from './sessionUtils';
export default {
    getUser(){
        return sessionUtils.getItem('user');
    },
    setUser(user){
        sessionUtils.setItem("user",user)
    },
    getUserName(){
        var user=sessionUtils.getItem("user");
        return user.userName;
    },
    getRealName(){
        var user=sessionUtils.getItem("user");
        return user.realName;
    },logout(o){
        sessionUtils.setItem("user",null)
        o.$router.push({path:"/login"})
    }
}
